
var Profile = {
	base: function (id) {
		var url = "my.php?do=Profile.base";		
		_dialog_view(url, '我的基本信息', '500x310');
	},
	
	info: function (id) {
		$.getJSON('my.php?do=Profile.auth', function(json) {
			if (json.status == 1) {
				var url = "my.php?do=Profile.info";
				_dialog_view(url, '我的个人资料', '550x350');
			} else {
				var s = prompt("请输入查询密码");
				if (s == null || s == '') {
					return;
				}
				var body = {};
				body.password = s;
				var r = $.getJSON('my.php?do=Profile.login', body, function(json) {
					if (json.status == 1) {
						var url = "my.php?do=Profile.info";
						_dialog_view(url, '我的个人资料', '550x350');
					} else {
						alert("密码错误，请重新输入！");
					}
				});
			}
		});
	},
	
	contract: function (id) {
		var url = "my.php?do=Profile.contract";
		_dialog_view(url, '我的入职信息', '550x350');
	},
	
	bank: function (id) {
		$.getJSON('my.php?do=Profile.auth', function(json) {
			if (json.status == 1) {
				var url = "my.php?do=Profile.bank";
				_dialog_view(url, '我的银行帐号', '550x350');
			} else {
				var s = prompt("请输入查询密码");
				if (s == null || s == '') {
					return;
				}
				var body = {};
				body.password = s;
				var r = $.getJSON('my.php?do=Profile.login', body, function(json) {
					if (json.status == 1) {
						var url = "my.php?do=Profile.bank";
						_dialog_view(url, '我的银行帐号', '550x350');
					} else {
						alert("密码错误，请重新输入！");
					}
				});
			}
		});
	},
	
	family: function (id) {
		
		var url = "my.php?do=Profile.family";
		_dialog_view(url, '我的家庭关系', '550x350');
	},
	
	education: function (id) {
		var url = "my.php?do=Profile.education";
		_dialog_view(url, '我的学习经历', '550x350');
	},
	
	work: function (id) {
		var url = "my.php?do=Profile.work";
		_dialog_view(url, '我的工作经历', '550x350');
	}
};
